/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.producer.builder.major;

import ru.jSkyRoom.factory.MajorProducerFactory;
import ru.jSkyRoom.interfaces.major.Major;
import ru.rakev.producer.Producer;
import ru.rakev.producer.builder.CompositeProducerBuilder;
import ru.rakev.producer.builder.StringProducerBuilder;

/**
 *
 * @author Rakev
 */
public abstract class MajorProducerBuilder<F, C extends Major> extends CompositeProducerBuilder<F, C> {

    public MajorProducerBuilder(Producer<F, C> producer) {
        super(producer);
    }

    public StringProducerBuilder<F, String> edid() {
        Producer<C, String> stringProducer = getProducerFactory().<C>createEdidProducer();
        Producer<F, String> curentProducedr = build(stringProducer);
        return new StringProducerBuilder<>(curentProducedr);
    }

    protected MajorProducerFactory getProducerFactory() {
        return MajorProducerFactory.create();
    }
}
